package com.easy;

/**
 * Created by Lxk on 2019/6/8.
 */
public class Solution867 {

    public int[][] transpose(int[][] A) {
        if(A==null || A.length==0 || A[0]==null || A[0].length==0){
            return null;
        }
        int col = A[0].length;
        int row = A.length;
        int[][] matrix = new int[col][row];
        for(int i = 0;i < row; i++){
            for(int j = 0;j < col; j++){
                matrix[j][i] =A[i][j];
            }
        }
        return matrix;
    }

}
